//
//  ZWHUserLIstTableViewCell.swift
//  约麻
//
//  Created by Syrena on 2017/7/20.
//  Copyright © 2017年 Sweet. All rights reserved.
//

import UIKit
import AVOSCloud

class ZWHUserLIstTableViewCell: UITableViewCell {
    @IBOutlet weak var nameL: UILabel!

    @IBOutlet weak var headV: UIImageView!
    
    var user:AVUser?{
        didSet{
            if let str = user?.object(forKey: "name") as? String{
                nameL.text = str
            }else{
                nameL.text = user?.username
            }
            
            if let imageurl = user?.object(forKey: "headimage") as? String{
                headV.sd_setImage(with: URL(string: imageurl))
            }else{
                headV.image = UIImage(named: "茶叶")
            }
        }
    }
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    
}
